SetAxisParameter

Sets the value of a vendor-specific parameter for an axis. The parameters are defined in McAxisParameter.

Syntax

KsCommandStatus SetAxisParameter(
     int Index,
     McAxisParameter ParameterNumber,
     double Value,
     McExecutionMode ExecutionMode
);

Parameters

Index [in]: the index of an axis. Indexes are zero based. Aliases affect this parameter.

ParameterNumber [in]: a parameter from McAxisParameter. You can use the parameter name or its corresponding number.

Value [in]: writes the value to the parameter you picked from McAxisParameter. For example, if you pick mcHomingMode from McAxisParameter, you need to select a mode from the McHomingMode type and write its value here.

ExecutionMode [in]: defines the chronological sequence of the function. See the McExecutionMode type.

Return value

Returns the KsCommandStatus structure.

Remarks

When modulo axis is enabled, the input value is converted to the modulo position for mcSoftLimitPositive, mcSoftwareLimitPositive, mcSoftLimitNegative, and mcSoftwareLimitNegative in McAxisParameter.

For example:

As a result, the axis cannot move beyond 150 in the positive direction or 60 in the negative direction.

Example

Copy
KsCommandStatus parameterCommand = WaitForCommand(5, TRUE,
   SetAxisParameter(0, McAxisParameter::mcSlaveHomingMode, 33, McExecutionMode::mcImmediately));

Requirements

  RT Win32
Minimum supported version 4.0 4.0
Header ksmotion.h ksmotion.h
Library KsApi_Rtss.lib KsApi.lib

See also

GetAxisParameter